package cn.mesmile.clickhouse.dao;

import cn.mesmile.clickhouse.crud.GeneralDaoProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.MapKey;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 *
 */
@Repository("generalDao")
public interface GeneralDao {

	Map<String,Object> selectByPrimaryKey(Map<String,Object> param);
	
	int deleteByPrimaryKey(Map<String,Object> param);
	
	int deleteByCondition(Map<String,Object> param);
	
	int insert(Map<String,Object> param);
	
	@InsertProvider(type= GeneralDaoProvider.class,method="insertSelectiveSql")
	int insertSelective(Map<String,Object> param);
	
	int insertBatch(Map<String,Object> param);
	
    int updateByPrimaryKey(Map<String,Object> param);
    
    int updateByConditionSelective(Map<String,Object> param);
	
	List<Map<String,Object>> selectAdvanced(Map<String,Object> param);
    
}